home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Tele / W-Z / WK⁄GEnie Procedures / Download < prev    next >
Encoding:
Text File  |  1991-05-25  |  1.5 KB  |  76 lines  |  [TEXT/MSWD]

  1. SETGROUP 1,1
  2. ERASE A1$
  3. (This is a box that will accept the file numbers to be downloaded.
  4. SHELL B1%,9001
  5. (If no numbers were entered, this will end the procedure
  6. EMPTY A1$
  7. IF YES END
  8. (This adds a comma to the end of the series of file numbers
  9. IF NO CONCAT A1$,,
  10. (These two steps set variables which are used latter
  11. LET EQUAL S1%,1
  12. LET EQUAL B3%,1
  13. (This section will divide the series of numbers into individual numbers
  14. :FINDFILENUMBERS
  15. (This determines the location of the commas
  16. INSTR A1%,A1$,B3%,,
  17. (The next four steps are used to detect the last number in the series
  18. LENGTH C1%,A1$
  19. TEST C1% = A%
  20. IF YES COPYINTO C1$,N
  21. IF NO COPYINTO C1$,Y
  22. (These two steps will end the proc. when there are no more numbers
  23. SUBTRACT A1%,B3%
  24. (This step finds a file number
  25. MID$ B1$,B3%,A1%,A1$
  26. (This goes to a subroutine which downloads a file
  27. :DOWNLOAD
  28. TEST S1% = 0
  29. IF YES JUMPTO MOVEAHEAD
  30. TYPE 6^M
  31. PROMPT ?
  32. PAUSE
  33. :MOVEAHEAD
  34. LET EQUAL S1%,1
  35. TYPE B1$
  36. TYPE ^M
  37. ALERT1 Try Again (Y/JUMPTO NOTFOUND
  38. PROMPT ?
  39. PAUSE
  40. TYPE D^M
  41. PROMPT ?
  42. PAUSE
  43. GETGROUP D%,1
  44. TEST D% = 2
  45. IF YES JUMPTO AUTODOWNLOAD
  46. (This is another box that will allow you to change your mind.
  47. SHELL B2%,9002
  48. TEST B2% = 1
  49. IF NO JUMPTO SKIPFILE
  50. :AUTODOWNLOAD
  51. TYPE 4^M
  52. PROMPT ?
  53. PAUSE
  54. :NOTFOUND
  55. TYPE C1$
  56. TYPE ^M
  57. PROMPT ?
  58. PAUSE
  59. CONTAINS C1$,N
  60. IF YES END
  61. :NEXTFILE
  62. LET EQUAL S1%,0
  63. ADD A1%,B3%
  64. ADD A1%,1
  65. LET EQUAL B3%,A1%
  66. (This returns the proc. to find another file number
  67. JUMPTO FINDFILENUMBERS
  68. :SKIPFILE
  69. TYPE ^M
  70. PROMPT ?
  71. PAUSE
  72. CONTAINS C1$,N
  73. IF NO JUMPTO NEXTFILE
  74. TYPE ^M
  75. END
  76.